package com.simtop.service.impl;


import com.simtop.dao.AlarmerMapper;
import com.simtop.pojo.wddata.Alarmre;
import com.simtop.pojo.wddata.AlarmreCord;
import com.simtop.service.AlarmreServer;
import com.simtop.vo.TyoeListVo;
import com.simtop.vo.TyoeListVos;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class AlarmreServerImpl implements AlarmreServer{

    @Autowired
    private AlarmerMapper alarmerMapper;


    @Override
    public void insertOneAlarmer(AlarmreCord alarmreCord) {
        alarmerMapper.insertOneAlarmer(alarmreCord);
    }

    @Override
    public int findByidandtype(int deviceId, String testType) {
        return alarmerMapper.findByidandtype(deviceId,testType);
    }

    @Override
    public AlarmreCord finNewDeviceAlarmre(int deviceId, String testType) {
        return alarmerMapper.finNewDeviceAlarmre(deviceId,testType);
    }

    @Override
    public void insertOnlyOneAlarmre(AlarmreCord alarmerCord) {
        alarmerMapper.insertOnlyOneAlarmre(alarmerCord);
    }

    @Override
    public List<Alarmre> finOneAlarmre(String column, String order, String alarmTimeBegins, String alarmTimeEnds, String alarmType, Integer alarmManage) {
        return alarmerMapper.finOneAlarmre(column,order,alarmTimeBegins,alarmTimeEnds,alarmType,alarmManage);
    }

    @Override
    public void deleteStatus(Integer id) {
        alarmerMapper.deleteStatus(id);
    }

    @Override
    public void deleteStatus2(ArrayList<Integer> sqsyidlist) {
        alarmerMapper.deleteStatus2(sqsyidlist);
    }

    @Override
    public void changeDeviceData(String id, String remark) {
        alarmerMapper.changeDeviceData(id,remark);
    }

    @Override
    public int getOne(int deviceId ,String timenew) {
        return alarmerMapper.getOne(deviceId , timenew);
    }

    @Override
    public int countAlarmer1() {
        return alarmerMapper.countAlarmer1();
    }

    @Override
    public int countAlarmer2() {
        return alarmerMapper.countAlarmer2();
    }

    @Override
    public List<String> findEverDay() {
        return alarmerMapper.findEverDay();
    }

    @Override
    public List<TyoeListVos> findBytime(String time) {

        return alarmerMapper.findBytime(time);
    }

    @Override
    public List<Alarmre> updateExlxDeviceAlarDataAll() {
        return alarmerMapper.updateExlxDeviceAlarDataAll();
    }

    @Override
    public List<Alarmre> findalarmreServer(ArrayList<Integer> sqsyidlist) {
        return alarmerMapper.findalarmreServer(sqsyidlist);
    }

    @Override
    public int findOne(String as) {
        return alarmerMapper.findOne(as);
    }

    @Override
    public int findTwo(String as) {
        return alarmerMapper.findTwo(as);
    }

    @Override
    public int findThree(String as) {
        return alarmerMapper.findThree(as);
    }

    @Override
    public int findFor(String as) {
        return alarmerMapper.findFor(as);
    }

    @Override
    public void deleteOneAlarmres(String alarmTimeBegins, String alarmTimeEnds, String alarmType, Integer alarmManage) {
         alarmerMapper.deleteOneAlarmres(alarmTimeBegins,alarmTimeEnds,alarmType,alarmManage);
    }

    @Override
    public void deletename(String deviceName1) {
        alarmerMapper.deletename(deviceName1);
    }

    @Override
    public void deletename2(String deviceName1) {
        alarmerMapper.deletename2(deviceName1);
    }

    @Override
    public void deleteAlarmres(String alarmTimeBegins, String alarmTimeEnds, String deviceNumber, String testType) {
        alarmerMapper.deleteAlarmres(alarmTimeBegins,alarmTimeEnds,deviceNumber,testType);
    }
}
